import random

def inittab():
    tab=[]
    tabi=[]
    for i in range(12):
        for j in range(12):
            tabi.append(0)
        tab.append(tabi)
        tabi=[]
    return tab

def affichetab(tab):
    for i in tab:
        print i

def an0(tab):
    for i in range(1,11):
        for j in range(1,len(tab[i])-1):
            r = random.randint(0,1)
            tab[i][j]=r
    return tab


def calcul(tab,ligne,colone):
    n=0
    for l in range(ligne-1,ligne+2):
        for c in range(colone-1,colone+2):
            n = n+tab[l][c]
    n = n-tab[ligne][colone]
    return n

def copieTab(tab):
    tmp=[]
    tmp1=[]
    for i in range(len(tab)):
        for j in range(len(tab[i])):
            tmp1.append(tab[i][j])
        tmp.append(tmp1)
        tmp1=[]
    return tmp

def evolue(tab):
    tabtemp=copieTab(tab)
    for i in range(1,11):
        for j in range(1,11):
            val = calcul(tabtemp,i,j)
            if tab[i][j]==1:
                if val >= 4 or val <= 1:
                    tab[i][j]=0
                else :
                    tab[i][j]=1
            else:
                if val == 3 and tab[i][j]==0:
                    tab[i][j]=1
    return tab

t = input("test")
print str(t)
